//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UserMessages, UserMessagesResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUserMessagesList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UserMessagesResponse>(`/uctoo/user_messages/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUserMessages = async (id: string) => {
  return requestClient.get<UserMessages>(`/uctoo/user_messages/${id}`);
};

export const adductooUserMessages = async (data: Partial<UserMessages>) => {
  return requestClient.post<UserMessages>('/uctoo/user_messages/add', data);
};

export const edituctooUserMessages = async (data: Partial<UserMessages>) => {
  return requestClient.post<UserMessages>('/uctoo/user_messages/edit', data);
};

export const deleteuctooUserMessages = async (id: string) => {
  return requestClient.post<any>('/uctoo/user_messages/del', { id });
};
